home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Atari Compendium
/
The Atari Compendium (Toad Computers) (1994).iso
/
files
/
umich
/
telecomm
/
fnordadl
/
fn132man.zoo
/
chapter.09
< prev
next >
Wrap
Text File
|
1991-09-02
|
18KB
|
417 lines
Chapter 9: Doors 126
9 Doors
The Fnordadel __door__ mechanism allows the Sysop to provide access to
external programs from within the BBS, in a controllable fashion. This
allows things like online games, additional file transfer protocols, or
whatever you feel like. This chapter describes the door mechanism.
9.1 Defining Doors
Doors are defined in the file `ctdldoor.sys', which lives in your
#sysdir. It is a simple ASCII text file, editable with any text editor or
word processor that will save in ASCII. It is read into memory by citadel
when it runs; if you change the file somehow while Fnordadel is running,
you'll have to [Q]uit from the BBS and re-run citadel to make the change
take effect.
9.1.1 Format of ctdldoor.sys
The `ctdldoor.sys' file consists of any number of lines (each of which
defines a separate door), in the following format:
<door> <mode> <program-name> [command tail] [#comment]
The fields should be separated by white-space (i.e., spaces or tabs).
The meanings of the individual fields are as follows:
door The name that Fnordadel will use to refer to this door. It must
be unique among all the doors you have defined.
mode The set of permissions/restrictions on this door. It
consists of a string of any of these characters (although some
combinations don't make sense):
`u' Anyone may use this door.
`a' Only Aides, Co-Sysops and the Sysop may use this
door.
`s' Only Co-Sysops and the Sysop may use this door.
`z' Only the Sysop may use this door (that's you usually,
but it could also be any Sysop logged in at the
system console, or who has supplied the system
password to get into the Sysop menu).
`c' Only users on the system console may use this door.
`m' Only users on the modem may use this door.
`d' This door must be executed from within a directory
room.
Chapter 9: Doors 127
`r' For `d' above; the directory must be readable.
`w' For `d' above; the directory must be writable.
`t' The user may provide a command tail for this command.
`n' Pass the user name to this command as part of the
command tail (as the end of the tail).
`x' This door is a ``system'' door. See Section 9.3.1
[System doors], page 130.
`v' This door is an ``archiver'' door, defining a file
archiver which Fnordadel will use to read the table
of contents of archive files. See Section 9.3.2
[Archiver doors], page 130.
`p' This door is a ``protocol'' door, defining a file
transfer protocol. See Section 9.3.3 [Protocol
doors], page 131.
`h' This door will be executed from the BBS home
directory (i.e. where ctdlcnfg.sys lives).
Normally, a door executed in a directory room will
be run from that room's directory. Some doors don't
like that, so this mode can be set to correct things.
If the `l' mode is also present, it will override
this mode.
`i' If present, this must be the last mode. The rest of
the mode string is the name of a room to which the
door will be linked. The door will only show up in
the `!?' list in that room, and will only be runnable
in that room. If the room name contains spaces,
replace them with `_' in the door declaration.
If a mode string ended with `iFoo_blort', for
example, this particular door is tied to room Foo
blort. If Foo blort is a directory room, Fnordadel
will make the room's directory the working directory
for the door when it is run. The `i' mode can't be
used with the `l' mode, described next.
`l' If present, this must be the last mode. The rest
of the mode string is the directory to which this
command will be linked. If a mode string ends
with `lc:\bin', for example, Fnordadel will make
`c:\bin' the current working directory when running
this command. The `l' mode can't be used with the
`i' mode, described above. If used with the `h'
mode, `l' takes precedence.
program-name
The full pathname, including the filename extension, of the
program attached to this door.
Chapter 9: Doors 128
command tail
The optional command tail to pass to this door upon execution.
If the door allows a user-supplied command tail, it will be
appended to this command tail, and user names (mode character
`n') are appended after everything else.
comment Also optional. This field must be preceded by a `#'. It allows
you to put in a short description of what the door does, which
users will see when they hit `!?'.
9.1.2 Example door definitions
Here are some sample door definitions, some of which you may want to use
on your system:
clog u e:\citutil\clog.tos -t # 3-column log reader
uclog s e:\citutil\clog.tos -p # log reader for Sysop
rz udrt c:\bin\rz.ttp # zmodem download
ez udwt c:\bin\sz.ttp # zmodem upload
The first example provides a quick way for users to get an
up-to-the-minute quickie listing of the user log; it will print out the
names only, in three-column format. (See `clog.man' for more on clog.)
The second example is for Sysop and Co-Sysop use only (note the mode
string of `s'). It runs clog and passes it the argument `-p' (which
enables the printing of passwords). You'd use this if someone forgot their
password and you wanted to find out what it was (be careful of hackers,
though).
The third example implements Zmodem downloads via the external program
`rz.ttp', which is kept in `c:\bin'. It passes no command tail of its own,
but it does allow the user to pass a tail in, so he can specify which
file(s) he wants to download.
The fourth example implements Zmodem uploads. Notice that the mode
string consists of `udwt'; the `w' means that this door is only usable in
rooms which allow uploads. Makes sense, right?
9.1.3 Notes
o In any directory room, the ``current directory'' (for the purposes of
the door program) is always set to be the directory attached to the
room, unless you use the link mode `l' to specify another directory.
o User-supplied command tails (enabled with `t' in the mode string) will
be scanned for occurences of `\' and `:' characters, and these will
be removed. This is to stop an unscrupulous user from passing full
pathnames to, say, a file transfer program and gaining access to
private information; users will only be able to access information to
which they have normal Citadel access (by being in a directory room).
Chapter 9: Doors